From: Anton Kikin Date: Tue, 18 Feb 2020 11:00:01 +0000 (+0300) Subject: luci-base: Add missed config parameter for cbi when converting to JSON X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=f77df82cd23b44e87b61084567f23e1e7da20e96;p=project%2Fluci.git luci-base: Add missed config parameter for cbi when converting to JSON The cbi() function has a second argument 'config' in which various configuration parameters can be passed. When converting the lua menu to JSON, we must also convert this parameter. Signed-off-by: Anton Kikin (cherry picked from commit 2d8299338e6c77fb15c457f5cf7f34dc0278db60) --- diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index c227b68c85..118ca221ae 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -193,7 +193,8 @@ local function target_to_json(target, module) elseif target.type == "cbi" then action = { ["type"] = "cbi", - ["path"] = target.model + ["path"] = target.model, + ["config"] = target.config } elseif target.type == "form" then action = {